package com.example.oauth2authserver.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.apache.ibatis.type.JdbcType;

import java.util.Date;

@Data
@TableName("oauth_client_details")
public class OAuthClientDetail {
    @TableField(value = "client_id")
    @TableId(type = IdType.NONE)
    private String clientId;
    @TableField(value = "resource_ids")
    private String resourceIds;
    @TableField(value = "client_secret")
    private String clientSecret;
    private String scope;
    @TableField(value = "authorized_grant_types")
    private String authorizedGrantTypes;
    @TableField(value = "web_server_redirect_uri")
    private String webServerRedirectUri;
    private String authorities;
    @TableField(value = "access_token_validity")
    private Integer accessTokenValidity;
    @TableField("refresh_token_validity")
    private Integer refreshTokenValidity;
    @TableField(value = "additional_information")
    private String additionalInformation;
    @TableField(value = "create_time",jdbcType = JdbcType.TIMESTAMP,update = "now()")
    private Date createTime;
    @TableField(value = "archived",jdbcType = JdbcType.TINYINT)
    private Short archived;
    @TableField(jdbcType = JdbcType.TINYINT)
    private Short trusted;
    @TableField(value = "autoapprove")
    private String autoApprove;

}
